<%@ include file="../common/IncludeTop.jsp"%>

<script type="text/javascript">
	$('#confirmOrder').on('click',function () {
	});
</script>

<div id="BackLink">
	<a href="service?action=viewCart">Return to Shopping Cart</a>
</div>

<div id="Catalog">
	<form action="service?action=newOrderForm" method="post">
		<h2>Checkout Summary</h2>
		<table>
			<tr>
				<td><b>Item ID</b></td>
				<td><b>Product ID</b></td>
				<td><b>Description</b></td>
				<td><b>In Stock?</b></td>
				<td><b>Quantity</b></td>
				<td><b>List Price</b></td>
				<td><b>Total Cost</b></td>
			</tr>

			<c:forEach var="cartItem" items="${sessionScope.cart.cartItems}">
				<tr>
					<td>
						<a href="viewItem?itemId=${cartItem.itemId}" name="itemId" value="${cartItem.itemId}">${cartItem.itemId}</a>
					</td>
					<td>
							${cartItem.productId}
					</td>
					<td>
							${cartItem.descn}
					</td>
					<td>
							${cartItem.inStock}
					</td>
					<td>
							${cartItem.quantity}
					</td>
					<td>
						<fmt:formatNumber value="${cartItem.listPrice}" pattern="$#,##0.00" />
					</td>
					<td>
						<fmt:formatNumber value="${cartItem.totalPrice}" pattern="$#,##0.00" />
					</td>
				</tr>
			</c:forEach>

			<tr>
				<td colspan="7">Sub Total: <fmt:formatNumber
						value="${sessionScope.cart.subTotal}" pattern="$#,##0.00" /></td>
			</tr>
		</table>
	<input type="submit" id="confirmOrder" value="confirmOrder">
	</form>
</div>

<%@ include file="../common/IncludeBottom.jsp"%>